package nothing.dao.hibernate;

import nothing.model.Currency;
import nothing.dao.CurrencyDao;
import org.appfuse.dao.hibernate.GenericDaoHibernate;

import java.util.List;

public class CurrencyDaoHibernate extends GenericDaoHibernate<Currency, Long> implements CurrencyDao {

    public CurrencyDaoHibernate() {
        super(Currency.class);
    }

    @SuppressWarnings("unchecked")
    public List<Currency> findByName(String name) {
        return getHibernateTemplate().find("from Currency where name=?", name);
    }
}

